package com.soft.javase.day02.review.extendss;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/4/16
 */
public class Cat extends Animal{
    private String type;

    public void catchMouse(){
        System.out.println("一只名为"+this.getName()+"的"+type+"正在捕捉老鼠");
    }

    @Override
    public void eat() {
        System.out.println("一只名为"+this.getName()+"的"+type+"正在吃猫粮");
    }

    public Cat() {
    }

    public Cat(String name, int age, String type) {
        super(name, age);
        this.type = type;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
